import axios from 'axios'
import type { RouteRecordNormalized } from 'vue-router';

export interface LoginData {
  username: string;
  password: string;
}

export interface LoginRes {
  token: string;
}
export function getMenuList() {
  return axios.post<RouteRecordNormalized[]>('/api/user/menu');
}
// 获取车间、分组、品温个数
export function getworkshop() {
  return axios.get('/api/workshop/getworkshop');
}
export function getGroupInfo(params: any) {
  return axios.post('/api/workshop/getGroupInfo',params);
}
// 保存数据
export function saveTempInfo(params: any) {
  return axios.post('/api/workshop/saveTempInfo', params);
}
// 获取品温详情
export function getTempInfo() {
  return axios.get('/api/workshop/getTempInfo');
}
// 保存品温数据
export function saveTempData(params: any) {
  return axios.post('/api/workshop/saveTempData', params);
}
// 保存地温每日记录
export function saveTempRecord(params: any) {
  return axios.post('/api/groundtoday/saveGroundInfo', params);
}
// 获取地温每日记录
export function getGroundTotay(params: any) {
  return axios.post('/api/groundtoday/getGround',params);
}